<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 

class Block_Page extends Core_Block {

	public function __construct() {
		$controller = App::registry('controller');
		$this->addBodyClass($controller->getControllerHandle());
	}
	
	public function getBodyClass() {
		return $this->getData('body_class');
	}

	/**
	 * Add CSS class to page body tag
	 *
	 * @param string $className
	 * @return Mage_Page_Block_Html
	 */
	public function addBodyClass($className) {
		$this->setBodyClass($this->getBodyClass() . ' ' . $className);
		return $this;
	}
}